<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require('tcpdf/tcpdf.php');
class Tpdf extends TCPDF
{
	// Extend FPDF using this class
	// More at fpdf.org -> Tutorials
	var $B;
	var $I;
	var $U;
	var $HREF;

	function __construct($params = array('P','mm', 'A4'))
	{
		
		// Call parent constructor
		if(!isset($params[0]) || !is_array($params))
		{
			parent::__construct('P','mm', 'A4');
		}
		else
		{
			parent::__construct($params[0],$params[1],$params[2],$params[3],$params[4]);
		}
		$this->B = 0;
		$this->I = 0;
		$this->U = 0;
		$this->HREF = '';		
	}
	
	    //Page header
    public function Header() {
        // Logo
        $image_file = './media/files/logo_missioni_rog.jpg';
        $this->Image($image_file, 15, 10, 90, '', 'JPG', '', 'T', true, 300, '', false, false, 0, false, false, false);
        
    }

    // Page footer
    public function Footer() {
        // Position at 15 mm from bottom
        $this->SetY(-15);
        // Set font
        $this->SetFont('helvetica', 'I', 8);
        // Page number
        $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
	
}


